<%@ taglib prefix="f" uri="http://java.sun.com/jsf/core" %>
<%@ taglib prefix="h" uri="http://java.sun.com/jsf/html" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Add Position</title>

    <style type="text/css">
    </style>
</head>
<body>
<f:view>
<h:messages errorStyle="color: #ff0000" globalOnly="false"/>
    
    <h:form id="positionForm">

<h:inputHidden id="currentEventId" value="#{positionHandler.currentEventId}" />

        <table>
            <tr><td colspan="2">Enter Position details for the event <h:outputText value="#{positionHandler.currentEvent.name}"/></td></tr>
            <tr><td>Name:</td>
                <td>
                    <h:inputText id="Name" required="true" value="#{positionHandler.name}" />
                    <h:message for="name" style="color: #ff0000" />
                </td></tr>
            <tr><td>Description (optional):</td><td><h:inputText id="Description" value="#{positionHandler.description}"  /></td></tr>
            <tr><td>Number of Volunteers needed:</td><td><h:inputText id="NumberOfVolunteers" required="true" value="#{positionHandler.numberOfVolunteers}">
             </h:inputText>
              </td></tr>
            <tr><td colspan="2">
                <h:commandButton value="#{'Add'}" action="#{positionHandler.createNew}" />
            </td></tr>
            <tr><td><a href="myEvents.jsf">Back to My Events</a></td></tr>
        </table>
    </h:form>
</f:view>
</body>
</html>